<%--
  Created by IntelliJ IDEA.
  User: wsx
  Date: 2016/12/30
  Time: 15:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>主页</title>
    <!-- Bootstrap core CSS -->
    <link href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <nav class="navbar navbar-default navbar-inverse" role="navigation">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse"
                            data-target="#bs-example-navbar-collapse-1"><span
                            class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span
                            class="icon-bar"></span><span class="icon-bar"></span></button>
                    <a class="navbar-brand" href="#">Brand</a>
                </div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav navbar-right">
                        <li>
                            <%
                                String uemail = (String) request.getSession().getAttribute("uemail");
                                if (null != uemail) {
                                    out.println("<li><a href=\"registerpage\">注册</a></li>");
                                    out.println("<li><a id=\"logout\" href=\"\">退出</a></li>");
                                    out.println("<li><a href=\"upload\" >上传</a></li>");
                                    out.println("<li><a href=\"download\" >下载</a></li>");
                                } else {
                                    out.println("<li><a href=\"/loginpage\">登录</a></li>");
                                    out.println("<li><a href=\"registerpage\" >注册</a></li>");
                                }
                            %>
                        </li>
                    </ul>
                </div>
            </nav>
        </div>
    </div>
</div>
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="../source/js/index.js"></script>
</body>
</html>